﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;

namespace DAL
{
    public class PhieuNhapHangQuery:DataProvide
    {
        //protected override object GetDataRowFromDataReader(SqlDataReader dr)
        //{
        //    NhaSanXuatDAL nsx = new NhaSanXuatDAL();
        //    nsx.MaNhaSanXuat = dr.GetString(0);
        //    if (!dr.IsDBNull(1))
        //        nsx.TenNhaSanXuat = dr.GetString(1);
        //    return (object)nsx;
        //}
        protected override object GetDataRowFromDataReader(SqlDataReader dr)
        {
            PhieuNhapHangDAL pnh = new PhieuNhapHangDAL();
            pnh.MaPhieuNhapHang = dr.GetString(0);
            if (!dr.IsDBNull(1))
                pnh.TaiKhoan = dr.GetString(1);
            //if (!dr.IsDBNull(2))
            //    pnh.NgayNhap;
            return (object)pnh;
        }

    }
}
